<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS处理</title>
    <style>
        div{
            width: 200px;
            height: 100px;
            background-color: red;
        }
        .c1{
            width: 400px;
            height: 200px;
            background-color: green;
        }
    </style>
    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <script>
        $(function(){
            $("div").mouseover(function(){
                // 相当于this.className = "c1"
               // $(this).addClass("c1");
               // 取值
               console.log($("div").css("width"));
               // 赋值
                $(this).css("width","400px");
                $(this).css("height","200px");
                $(this).css("background-color","green");
            });
            $("div").mouseout(function(){
               // $(this).removeClass("c1");
                $(this).css("width","200px");
                $(this).css("height","100px");
                $(this).css("background-color","red");
            });
        })
    </script>
</head>
<body>
<div></div>
</body>
</html>